package com.itheima.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.itheima.mapper.SetmealGroupMapper;
import com.itheima.pojo.SetmealGroup;
import com.itheima.service.SetmealGroupService;
import org.apache.dubbo.config.annotation.Service;

@Service
public class SetmealGroupServiceImpl extends ServiceImpl<SetmealGroupMapper, SetmealGroup> implements SetmealGroupService {
    @Override
    public boolean deleteBySetmealId(long setmealId) {
        QueryWrapper<SetmealGroup> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("setmeal_id",setmealId);
        return this.remove(queryWrapper);
    }

    @Override
    public Long[] selectGroupIds(Long setmealId) {
        return this.baseMapper.selectGroupIds(setmealId);
    }
}
